﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="ReadList.aspx.cs" Inherits="Frogism.Web.Views.Book.ReadList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <asp:ListView ID="readList" runat="server" >
		<LayoutTemplate>
			<table class="DashboardTable"  cellspacing="0" cellpadding="1">
				<tr>
					<th>Date</th>
					<th>Page</th>
					<th>Edit</th>
					<th>Delete</th>
				</tr>
				<asp:PlaceHolder ID="itemPlaceHolder" runat="server" />
				</table>
		</LayoutTemplate>
		<AlternatingItemTemplate>
			<tr>
			<td><%#((DateTime)Eval("ReadDate")).ToString("yyyy.MM.dd") %></td>
			<td class="NumberCell"><%# Eval("Page")%></td>
			<td>(<%# Html.ActionLink("Edit", "Read", new { id = Eval("Id"), bookid = ViewData["BookId"] })%>)</td>
			<td>(<a href="<%# Url.Action("ReadDelete",new { id = Eval("Id") }) %>" onclick="return confirm('Are you sure?')">X</a>)</td>
			</tr>
		</AlternatingItemTemplate>
		<ItemTemplate>
			<tr class="AltColumn">
			<td><%#((DateTime)Eval("ReadDate")).ToString("yyyy.MM.dd") %></td>
			<td class="NumberCell"><%# Eval("Page")%></td>
			<td>(<%# Html.ActionLink("Edit", "Read", new { id = Eval("Id"), bookid = ViewData["BookId"] })%>)</td>
			<td>(<a href="<%# Url.Action("ReadDelete",new { id = Eval("Id"), bookid= ViewData["BookId"] }) %>" onclick="return confirm('Are you sure?')">X</a>)</td>
			</tr>
		</ItemTemplate>
		<EmptyDataTemplate>
			Thre are no reads to be listed.
		</EmptyDataTemplate>
	</asp:ListView>
</asp:Content>
